package com.alks.common.utils;

import com.alks.common.utils.stringUtils.ZStringUtils;
import com.itextpdf.layout.element.Cell;
import com.itextpdf.layout.property.TextAlignment;
import com.itextpdf.layout.element.Paragraph;
public class ITextPdfUtils {
    public ITextPdfUtils() {
    }

    public static Cell singleRightCell(String content) {
        Cell cell = new Cell();
        cell.setTextAlignment(TextAlignment.RIGHT);
        if (ZStringUtils.isNull(content)) {
            content = "";
        }

        cell.add(new Paragraph(content));
        return cell;
    }

    public static Cell singleCenterCell(String content) {
        Cell cell = new Cell();
        cell.setTextAlignment(TextAlignment.CENTER);
        if (ZStringUtils.isNull(content)) {
            content = "";
        }

        cell.add(new Paragraph(content));
        return cell;
    }
}